package com.smitish.vueblog.mapper;

import cn.hutool.system.UserInfo;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.smitish.vueblog.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Smitish
 * @since 2020-11-30
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * @param email       需要修改的邮箱
     * @param description 需要修改的个人简介
     * @param id          用户ID
     * @return 返回给Service层进行处理
     */
    @Update("UPDATE m_user SET email = '${email}' , description = '${description}' WHERE id = ${id}")
    boolean updateUserInfo(@Param("email") String email, @Param("description") String description, @Param("id") Long id);
}
